package com.nari.ies.ne.nw.server.mapper;

import com.nari.ies.ne.nw.server.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface PlantDataMapper {
    //查询场站信息
    List<Map<String, Object>> selectPlantData(@Param("code") String code);
    //查询场站台账装机
    float selectPlantCapacityData(long id);
    //查询升压站(变压器)信息
    List<Map<String, Object>> selectSYZXXData(String id);
    //根据场站id查风机数
    int selectWindGeneratorNumber(long id);
    //根据场站id查逆变器个数
    int selectNBQNumber(long id);
    //根据场站id查汇流箱个数
    int selectHLXNumber(long id);
    //根据场站id查箱变个数
    int selectXBNumber(long id);
    //根据场站id查方阵个数
    int selectFZNumber(@Param("id") long id);



    // 插入风电场表
    void insertWindFileScoreEntity(WindFileScoreEntity windFileScoreEntity);
    // 插入光伏电场表
    void insertPvFileScoreEntity(PvFileScoreEntity pvFileScoreEntity);
    // 插入区域表
    void insertAreaFileScoreEntity(AreaFileScoreEntity areaFileScoreEntity);
    //查询全网场站信息
    List<Map<String, Object>> selectAllplantData();



    //查询所有市区信息
    List<Map<String, Object>> selectAllAreaData();
    //查询市区下风电场站数目
    int selectWindPlantNumByAreaId(String areaId);
    //查询市区下光伏场站数目
    int selectPvPlantNumByAreaId(String areaId);
    // 查询区域风电场平均值
    List<Map<String, Object>> selectAvgAreaWindPlantData(String areaId, Date startTime, Date endTime,int staticType);
    // 查询区域光伏电场平均值
    List<Map<String, Object>> selectAvgAreaPvPlantData(String areaId, Date startTime, Date endTime,int staticType);



    //查询阳江信息
    Map<String, Object> selectYJData();
    //查询阳江风电场站数目
    int selectWindPlantNumByYJId();
    //查询阳江光伏场站数目
    int selectPvPlantNumByYJId();
    //查询阳江风电场平均值
    List<Map<String, Object>> selectAvgYJWindData(Date startTime, Date endTime);
    //查询阳江光伏电场平均值
    List<Map<String, Object>> selectAvgYJPvData( Date startTime, Date endTime);



    //查询风电场平均值
    List<Map<String, Object>> selectAvgWindPlantData(String plantId, Date startTime, Date endTime);
    //查询光伏电场平均值
    List<Map<String, Object>> selectAvgPvPlantData(String plantId, Date startTime, Date endTime);

    void insertWindDataScoreEntity(WindDataScoreEntity windDataScoreEntity);

    void insertPvDataScoreEntity(PvDataScoreEntity pvDataScoreEntity);
}
